Optimal. Leaf size=71 \[ -\frac {a^2 \sqrt {c+d x}}{c x}-\frac {a (4 b c-a d) \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{c^{3/2}}+\frac {2 b^2 \sqrt {c+d x}}{d} \]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {89, 80, 63, 208} \begin {gather*} -\frac {a^2 \sqrt {c+d x}}{c x}-\frac {a (4 b c-a d) \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{c^{3/2}}+\frac {2 b^2 \sqrt {c+d x}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 80
Rule 89
Rule 208
Rubi steps
\begin {align*} \int \frac {(a+b x)^2}{x^2 \sqrt {c+d x}} \, dx &=-\frac {a^2 \sqrt {c+d x}}{c x}+\frac {\int \frac {\frac {1}{2} a (4 b c-a d)+b^2 c x}{x \sqrt {c+d x}} \, dx}{c}\\ &=\frac {2 b^2 \sqrt {c+d x}}{d}-\frac {a^2 \sqrt {c+d x}}{c x}+\frac {(a (4 b c-a d)) \int \frac {1}{x \sqrt {c+d x}} \, dx}{2 c}\\ &=\frac {2 b^2 \sqrt {c+d x}}{d}-\frac {a^2 \sqrt {c+d x}}{c x}+\frac {(a (4 b c-a d)) \operatorname {Subst}\left (\int \frac {1}{-\frac {c}{d}+\frac {x^2}{d}} \, dx,x,\sqrt {c+d x}\right )}{c d}\\ &=\frac {2 b^2 \sqrt {c+d x}}{d}-\frac {a^2 \sqrt {c+d x}}{c x}-\frac {a (4 b c-a d) \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{c^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 65, normalized size = 0.92 \begin {gather*} \frac {\sqrt {c+d x} \left (2 b^2 c x-a^2 d\right )}{c d x}+\frac {a (a d-4 b c) \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{c^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.12, size = 81, normalized size = 1.14 \begin {gather*} \frac {\sqrt {c+d x} \left (-a^2 d^2-2 b^2 c^2+2 b^2 c (c+d x)\right )}{c d^2 x}+\frac {\left (a^2 d-4 a b c\right ) \tanh ^{-1}\left (\frac {\sqrt {c+d x}}{\sqrt {c}}\right )}{c^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.31, size = 158, normalized size = 2.23 \begin {gather*} \left [-\frac {{\left (4 \, a b c d - a^{2} d^{2}\right )} \sqrt {c} x \log \left (\frac {d x + 2 \, \sqrt {d x + c} \sqrt {c} + 2 \, c}{x}\right ) - 2 \, {\left (2 \, b^{2} c^{2} x - a^{2} c d\right )} \sqrt {d x + c}}{2 \, c^{2} d x}, \frac {{\left (4 \, a b c d - a^{2} d^{2}\right )} \sqrt {-c} x \arctan \left (\frac {\sqrt {d x + c} \sqrt {-c}}{c}\right ) + {\left (2 \, b^{2} c^{2} x - a^{2} c d\right )} \sqrt {d x + c}}{c^{2} d x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.36, size = 74, normalized size = 1.04 \begin {gather*} \frac {2 \, \sqrt {d x + c} b^{2} - \frac {\sqrt {d x + c} a^{2} d}{c x} + \frac {{\left (4 \, a b c d - a^{2} d^{2}\right )} \arctan \left (\frac {\sqrt {d x + c}}{\sqrt {-c}}\right )}{\sqrt {-c} c}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 63, normalized size = 0.89 \begin {gather*} \frac {2 \left (\frac {\left (a d -4 b c \right ) \arctanh \left (\frac {\sqrt {d x +c}}{\sqrt {c}}\right )}{2 c^{\frac {3}{2}}}-\frac {\sqrt {d x +c}\, a}{2 c x}\right ) a d +2 \sqrt {d x +c}\, b^{2}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.98, size = 92, normalized size = 1.30 \begin {gather*} -\frac {1}{2} \, {\left (\frac {2 \, \sqrt {d x + c} a^{2}}{{\left (d x + c\right )} c - c^{2}} - \frac {4 \, \sqrt {d x + c} b^{2}}{d^{2}} - \frac {{\left (4 \, b c - a d\right )} a \log \left (\frac {\sqrt {d x + c} - \sqrt {c}}{\sqrt {d x + c} + \sqrt {c}}\right )}{c^{\frac {3}{2}} d}\right )} d \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.16, size = 59, normalized size = 0.83 \begin {gather*} \frac {2\,b^2\,\sqrt {c+d\,x}}{d}+\frac {a\,\mathrm {atanh}\left (\frac {\sqrt {c+d\,x}}{\sqrt {c}}\right )\,\left (a\,d-4\,b\,c\right )}{c^{3/2}}-\frac {a^2\,\sqrt {c+d\,x}}{c\,x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 92.93, size = 109, normalized size = 1.54 \begin {gather*} - \frac {a^{2} \sqrt {d} \sqrt {\frac {c}{d x} + 1}}{c \sqrt {x}} + \frac {a^{2} d \operatorname {asinh}{\left (\frac {\sqrt {c}}{\sqrt {d} \sqrt {x}} \right )}}{c^{\frac {3}{2}}} + \frac {4 a b \operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{c}} \sqrt {c + d x}} \right )}}{c \sqrt {- \frac {1}{c}}} + b^{2} \left (\begin {cases} \frac {x}{\sqrt {c}} & \text {for}\: d = 0 \\\frac {2 \sqrt {c + d x}}{d} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________